<?php
/**
 * User: aka
 * Time: 20:28
 */

namespace app\tenno\model;

use think\Model;

class GoodsEntry extends Model
{
    public function scopeStuffName($query, $name)
    {
        $query->where('name|english_name|aka', 'like', '%' . $name . '%');
    }

    public function scopeDeleteState($query, $code)
    {
        $query->where('delete_state', '=', $code)
            ->field('delete_time, delete_state',true);
    }
}